<?php
session_start();
unset($_SESSION['user'],$_SESSION['pos'], $_SESSION['name']);
$_SESSION['stat'] = "logout";
$_SESSION['msg'] = "You have successfully logged out of the system";
header("Location: index.php");

?>